package com.woniu.smallmedical.controller;

import com.woniu.smallmedical.entity.Receptiontype;
import com.woniu.smallmedical.entity.ResponseResult;
import com.woniu.smallmedical.server.ReceptiontypeServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ReceptiontypeController {
    @Autowired
    ReceptiontypeServer receptiontypeServer;

    @GetMapping("/selectReceptiontype")
    public ResponseResult selectReceptiontype(){
        System.out.println("初诊、复诊！！！！");
        List<Receptiontype> receptiontypes = receptiontypeServer.selectReceptiontype();
        return new ResponseResult(receptiontypes,200,"初诊、复诊");
    }
}
